<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>添加文档</title>
	<hdjs />
	<script type="text/javascript">
	$(function(){
		$('form').validate({{$validate}});
	})
	</script>
	<js file="__PUBLIC__/js/mod.base.js,__PUBLIC__/js/mod.article.js" />
	<css file='__PUBLIC__/css/mod.base.css,__PUBLIC__/css/mod.article.css' />
</head>
<body>
	<form action="" method="post" enctype='multipart/form-data' class='hd-form' name="form">
		

			<if condition='$curCatType neq 4'>
			<div class="hd-menu-list">
				<ul>
					<li>
						<a href="{:U('Article/index',array('category_cid'=>$_GET['category_cid'],'verifystate'=>$_GET['verifystate']))}" >文档列表</a>
					</li>
					<li class='active'>
						<a href="javascript:;" >添加文档</a>
					</li>
					
				</ul>
			</div>
			</if>

			<div class="hd-title-header">温馨提示</div>
			<div class="help">
			    <ul>
			        <li>
			          {$curCname} 添加文档
			        </li>
			    </ul>
			</div>
			<div class="right_content">
				<div class="hd-tab">
					<ul class="hd-tab-menu">
						<li lab='base' class="active">
							<a href="#">基本信息</a>
						</li>
						<if condition='$curCatType neq 4'>
							<li lab='pic'>
								<a href="#">图集信息</a>
							</li>
						</if>
						<li lab='other'>
							<a href="#">其他设置</a>
						</li>
					</ul>
					<div class="hd-tab-content">
						<div lab='base' class="hd-table-area" >
							<table class='hd-table hd-table-form hd-form'>
								<tbody>
									<tr>
										<th class="hd-w100">
											栏目分类
											<span class="star">*</span>
										</th>
										<td>
											<if condition='$curCatType neq 4'>
											<select name="category_cid" >
												<option value="0">请选择分类</option>
												<option value="{$curCid}" <if condition="$curCid eq $_GET['category_cid']">selected='selected'</if>>
													{$curCname}
												</option>
												<foreach name='topChild' item='v'>
												<option value="{$v.cid}" <if condition="$v['cid'] eq $_GET['category_cid']">selected='selected'</if>>---{$v._html}{$v.cname}</option>
												</foreach>
											</select>
											<else />
												{$curCname}
												<input type="hidden" name="category_cid" value="{$Think.get.category_cid}" />
											</if>
										</td>
									</tr>
									<tr>
										<th>
											标题
											<span class="star">*</span>
										</th>
										<td>

											<input type="text" name="article_title" class='hd-w300' />	

										</td>
									</tr>
									<tr>
										<th>
											(英)标题
										</th>
										<td>

											<input type="text" name="article_title_en" class='hd-w300' />	

										</td>
									</tr>
									<tr>
										<th >
											关键字
											
										</th>
										<td>
											<textarea name="keywords" class='hd-w500 hd-h100'></textarea>
										</td>
									</tr>
									<tr>
										<th>
											(英)关键字
										</th>
										<td>
											<textarea name="keywords_en" class='hd-w500 hd-h100'></textarea>
										</td>
									</tr>
									<tr>
										<th>
										描述
										
										</th>
										<td>
											<textarea name="description" class='hd-w500 hd-h100'></textarea>
										</td>
									</tr>
									<tr>
										<th>
										(英)描述
										
										</th>
										<td>
											<textarea name="description_en" class='hd-w500 hd-h100'></textarea>
										</td>
									</tr>
									<tr >
										<th>
										排序
										<span class="star">*</span>
										</th>
										<td>
											<input type="text" name="sort" class='hd-w200' value="100" />	
										</td>
									</tr>

									<tr>
										<th>
										浏览次数
										<span class="star">*</span>
										</th>
										<td>
											<input type="text" name="click" class='hd-w200' value="100" />	
										</td>
									</tr>

									<tr>
										<th>
										发布时间
										<span class="star">*</span>
										</th>
										<td>
											<input id='addtime' type="text" name="addtime" class='hd-w200' />	
											<script>
												$('#addtime').calendar({
													format : 'yyyy-MM-dd'
												});
											</script>
										</td>
									</tr>

									<tr>
										<th>
											审核
											<span class="star">*</span>
										</th>
										<td>
											<label >
												<input name="verifystate" type="radio"  value="1" />
												审核中
											</label>&nbsp;&nbsp;
											<label >
												<input checked="checked" name="verifystate" type="radio" value="2" />
												通过
											</label>
										</td>
									</tr>
									<tr>
										<th>
											属性
											
										</th>
										<td>
											<foreach name='flag' item='v'>
												<label >
													<input name="flag[]" type="checkbox"  value="{$v}" />
													{$v}({$key})
												</label>&nbsp;&nbsp;
											</foreach>
										</td>
									</tr>
								
									<tr >
										<th>文件</th>
										<td>
											<input type="file" name='file'/>
										</td>
									</tr>
									<tr>
										<th>
											图片
											
										</th>
										<td>
											<input type="file" name='pic'/>
										</td>
									</tr>
									
									<foreach name='extForm' item='v'>
										<tr>
											<th>{$v.title}</th>
											<td>{$v.html}</td>
										</tr>
									</foreach>

									<if condition="$attrForm">
										<tr><th colspan='2' style='text-align:left'>筛选</th></tr>
										<foreach name='attrForm' item='v'>
										<tr <if condition='$v["is_pic"]'>pic='1'<else />pic='0'</if>>
											<th>{$v.title}</th>
											<td>{$v.html}</td>
										</tr>
										</foreach>
									</if>
									
								

								</tbody>
							  </table>
							  
							 
							   
						</div>
						<div lab='pic' class='hd-tab-area' id='pic'>

							<div class="no_pic">
							<table class='hd-table hd-table-form hd-form'>
								<tbody>
				
									<tr>
										<th class="hd-w100"><span class="hand" onclick="add_pic(this)">[+]</span></th>
										<td ><input type="file" name="img[]" class="input noborder"></td>
									</tr>
									
								</tbody>
							</table>
							</div>
							<div class="has_pic"  style="display:none">
								<div class="hd-tab">
					                <ul class="hd-tab-menu">
					                   
					                    
					                </ul>
            
						            <div class="hd-tab-content">
						        
							        </div>
					            </div>
							</div>
							
						</div>
						<div lab='other' class='hd-tab-area'>
							<table class='hd-table hd-table-form hd-form'>
								<tbody>
				
									<tr>
										<th class="hd-w100">跳转地址</th>
										<td ><input name="jump_url" type="text" class="hd-w200"></td>
									</tr>
									<tr>
										<th class="hd-w100">自定义文件名</th>
										<td ><input name="file_url" type="text" class="hd-w200"></td>
									</tr>
									
								</tbody>
							</table>
						</div>

					</div>
				</div>
			</div>
		
			<input type="hidden" name="isattr" value="0" id='isattr' />
			<input type="submit" class='hd-btn hd-btn-sm' value="添加" />
			<input type="button" class="hd-btn hd-btn-sm" onclick="location.href='{:U('Article/index',array('category_cid'=>$_GET['category_cid']))}'" value="返回"/>

	</form>
</body>
</html>